﻿<UserControl x:Class="ViCode_LeVi.Controls.VMTabBalanceAndOthers_Price"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:xcdg="clr-namespace:Xceed.Wpf.Controls;assembly=Xceed.Wpf.Controls"
             xmlns:vmcontrol="clr-namespace:ViCode_LeVi.Controls">
    <ScrollViewer>
        <StackPanel>
            <DockPanel>
                <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right" >
                    <vmcontrol:VMTextBlockExt  Margin="2" TextPath="CurrencySymbol_UI" />
                    <vmcontrol:VMTextBox_Number  Margin="2" Text="{Binding CurrencySymbol}"/>
                    <Button Content="Print" Click="Button_Click"/>
                </StackPanel>
                <vmcontrol:VMTextBlock_Fincance_Title TextPath="Step_BalanceAndOthers_Price_Header" Margin="2" Grid.Column="0" Grid.Row="0"  VerticalAlignment="Center"/>

                <StackPanel>
                    <TextBlock Text="1" Visibility="Hidden"/>
                    <TextBlock Text="1" Visibility="Hidden"/>
                </StackPanel>
            </DockPanel>
<vmcontrol:VMTextBlock_Fincance_Space_Header/>
            
            <StackPanel>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="3*"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="2*"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Horizontal"  Grid.Column="0" Grid.Row="1"  VerticalAlignment="Center">
                        <CheckBox IsChecked="{Binding IsPreCalculation}" Margin="2">
                            <vmcontrol:VMTextBlockExt TextPath="UIText_PreCalculation" Margin="2" Grid.Column="0" Grid.Row="0"  VerticalAlignment="Center"/>
                        </CheckBox>
                        <CheckBox IsChecked="{Binding IsPostCalculation}" Margin="2">
                            <vmcontrol:VMTextBlockExt TextPath="UIText_POSTCalculation" Margin="2" Grid.Column="0" Grid.Row="0"  VerticalAlignment="Center"/>
                        </CheckBox>
                    </StackPanel>     
                    
                    <vmcontrol:VMTextBlockExt TextPath="UIText_Order" Margin="2" Grid.Column="1" Grid.Row="0"  VerticalAlignment="Center"/>
                    <vmcontrol:VMTextBox_MultiLine Margin="2" Text="{Binding Order}" Grid.Column="2" Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Stretch"/>
                    
                    <vmcontrol:VMTextBlockExt TextPath="UIText_Author" Margin="2" Grid.Column="3" Grid.Row="0" VerticalAlignment="Center"/>
                    <vmcontrol:VMTextBox Text="{Binding Author}" Margin="2"  Grid.Column="4" Grid.Row="0" VerticalAlignment="Center"/>
                    <vmcontrol:VMTextBlockExt TextPath="UIText_Date" Margin="2" Grid.Column="3" Grid.Row="1"  VerticalAlignment="Center"/>
                    <xcdg:DatePicker SelectedDate="{Binding Date,Mode = TwoWay}" Margin="2" HorizontalAlignment="Left"  Grid.Column="4" Grid.Row="1" VerticalAlignment="Center"/>
                </Grid>
            </StackPanel>
            
            <TextBlock Text="1" Visibility="Hidden"/>
            <TextBlock Text="1" Visibility="Hidden"/>
            
            <StackPanel>
                <vmcontrol:VMTextBlock_Price_GroupHeader_CanEdit TextPath="UIText_MATERIAL"/>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="6*"/>
                        <ColumnDefinition Width="2"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>                    
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_IndividualMaterial" Margin="2"  Grid.Column="0"/>
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_Costs" Margin="2"  Grid.Column="2"/>
                    <Button VerticalAlignment="Top" Visibility="Hidden"  OverridesDefaultStyle="True" MinHeight="0" MinWidth="0" Margin="2"  Grid.Column="3" Focusable="False">
                        <Button.Content>
                            <Image Source="pack://application:,,,/Images/closex.png" Stretch="Uniform"/>
                        </Button.Content>
                    </Button>
                </Grid>
                <StackPanel Name="StackPanel_Material">                    
                </StackPanel>
                <StackPanel Margin="2" Orientation="Horizontal" HorizontalAlignment="Right" >
                    <Button Margin="2"  Name="Button_AddNew_Material" >
                        <Button.Content>
                            Add new
                        </Button.Content>
                    </Button>
                </StackPanel>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="4*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="2"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_MaterialOverheadCosts" Margin="2"  Grid.Column="0"/>
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_RatePercent" Margin="2"  Grid.Column="1" HorizontalAlignment="Right" />
                    <vmcontrol:VMTextBox_Number Text="{Binding Material_RatePercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"  Grid.Column="2"/>
                    <vmcontrol:VMTextBox_Number_ReadOnly Text="{Binding MaterialOverHeadCosts, Mode = OneWay}" Margin="2"  Grid.Column="4"/>
                    
                    <vmcontrol:VMTextBlock_Price_Total_CanEdit TextPath="UIText_TotalMaterialCosts" Margin="2"  Grid.Column="0" Grid.Row="1"/>
                    <vmcontrol:VMTextBox_Number_ReadOnly Text="{Binding TotalMaterialCosts, Mode = OneWay}" Margin="2"  Grid.Column="4" Grid.Row="1"/>
                    <Button VerticalAlignment="Top" Visibility="Hidden"  OverridesDefaultStyle="True" MinHeight="0" MinWidth="0" Margin="2"  Grid.Column="5" Focusable="False">
                        <Button.Content>
                            <Image Source="pack://application:,,,/Images/closex.png" Stretch="Uniform"/>
                        </Button.Content>
                    </Button>
                </Grid>
            </StackPanel>

            <TextBlock Text="1" Visibility="Hidden"/>
            <TextBlock Text="1" Visibility="Hidden"/>
            
            <StackPanel>
                <vmcontrol:VMTextBlock_Price_GroupHeader_CanEdit TextPath="UIText_WAGES"/>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="4*"/>
                        <ColumnDefinition Width="2"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="2"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="2"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_DirectLaborCosts" Margin="2"  Grid.Column="0"/>
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_Hours" Margin="2"  Grid.Column="2" HorizontalAlignment="Stretch" />
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_RatePecentPerHour" Margin="2"  Grid.Column="4"/>
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_Costs" Margin="2"  Grid.Column="6"/>
                </Grid>
                <StackPanel Name="StackPanel_Wages">
                </StackPanel>
                <StackPanel Margin="2" Orientation="Horizontal" HorizontalAlignment="Right" >
                    <Button Margin="2"  Name="Button_AddNew_Wages" >
                        <Button.Content>
                            Add new
                        </Button.Content>
                    </Button>
                </StackPanel>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="4*"/>
                        <ColumnDefinition Width="2"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="2"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="2"/>
                        <ColumnDefinition Width="*"/>
                       <ColumnDefinition Width="Auto"/> 
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_WagesOverheadCosts" Margin="2"  Grid.Column="0"/>
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_RatePercent" Margin="2"  Grid.Column="2" HorizontalAlignment="Right" />
                    <vmcontrol:VMTextBox_Number Text="{Binding Wages_RatePercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"  Grid.Column="4"/>
                    <vmcontrol:VMTextBox_Number_ReadOnly Text="{Binding WagesOverHeadCosts, Mode = OneWay}" Margin="2"  Grid.Column="6"/>

                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_TotalCostsForWages" Margin="2"  Grid.Column="0" Grid.Row="1"/>
                    <vmcontrol:VMTextBox_Number_ReadOnly Text="{Binding TotalWagesCosts, Mode = OneWay}" Margin="2"  Grid.Column="6" Grid.Row="1"/>

                    <Button VerticalAlignment="Top" Visibility="Hidden"  OverridesDefaultStyle="True" MinHeight="0" MinWidth="0" Margin="2"  Grid.Column="7" Focusable="False">
                        <Button.Content>
                            <Image Source="pack://application:,,,/Images/closex.png" Stretch="Uniform"/>
                        </Button.Content>
                    </Button>
                </Grid>
            </StackPanel>

            <TextBlock Text="1" Visibility="Hidden"/>
            <TextBlock Text="1" Visibility="Hidden"/>
            
            <StackPanel>
                <StackPanel Orientation="Horizontal">
                    <vmcontrol:VMTextBlock_Price_GroupHeader_CanEdit TextPath="UIText_DIRECTCOSTS"/>
                    <vmcontrol:VMTextBlockExt TextPath="UIText_UseOfMachinesAndEquipment"/>
                </StackPanel>
                <Grid Visibility="Collapsed">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="6*"/>
                        <ColumnDefinition Width="2"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_IndividualDirectCosts" Margin="2"  Grid.Column="0"/>
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_Costs" Margin="2"  Grid.Column="2"/>
                    <Button VerticalAlignment="Top" Visibility="Hidden"  OverridesDefaultStyle="True" MinHeight="0" MinWidth="0" Margin="2"  Grid.Column="3" Focusable="False">
                        <Button.Content>
                            <Image Source="pack://application:,,,/Images/closex.png" Stretch="Uniform"/>
                        </Button.Content>
                    </Button>
                </Grid>
                <StackPanel Name="StackPanel_DirectCosts">
                </StackPanel>
                <StackPanel Margin="2" Orientation="Horizontal" HorizontalAlignment="Right" >
                    <Button Margin="2"  Name="Button_AddNew_DirectCosts" >
                        <Button.Content>
                            Add new
                        </Button.Content>
                    </Button>
                </StackPanel>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="4*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="2"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <!--<RowDefinition Height="Auto"/>-->
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <!--<vmcontrol:VMTextBlock_Price_1 Visibility="Collapsed" Text="DirectCosts overhead costs:" Margin="2"  Grid.Column="0"/>
                    <vmcontrol:VMTextBlock_Price_1 Visibility="Collapsed"  Text="rate %:" Margin="2"  Grid.Column="1"/>
                    <vmcontrol:VMTextBox_Number  Visibility="Collapsed" Text="{Binding DirectCosts_RatePercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"  Grid.Column="2"/>
                    <vmcontrol:VMTextBox_Number_ReadOnly  Visibility="Collapsed" Text="{Binding DirectCostsOverHeadCosts, Mode = OneWay}" Margin="2"  Grid.Column="4"/>-->

                    <vmcontrol:VMTextBlock_Price_Total_CanEdit TextPath="UIText_TotalDirectCosts" Margin="2"  Grid.Column="0" Grid.Row="1"/>
                    <vmcontrol:VMTextBox_Number_ReadOnly Text="{Binding TotalDirectCostsCosts, Mode = OneWay}" Margin="2"  Grid.Column="4" Grid.Row="1"/>
                    <Button VerticalAlignment="Top" Visibility="Hidden"  OverridesDefaultStyle="True" MinHeight="0" MinWidth="0" Margin="2"  Grid.Column="5" Focusable="False">
                        <Button.Content>
                            <Image Source="pack://application:,,,/Images/closex.png" Stretch="Uniform"/>
                        </Button.Content>
                    </Button>
                </Grid>
            </StackPanel>
            
            <TextBlock Text="1" Visibility="Hidden"/>
            
            <StackPanel>
                <Grid >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="4*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="2"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <TextBlock Text="1" Visibility="Hidden" Grid.Row="1"/>
                    <TextBlock Text="1" Visibility="Hidden" Grid.Row="3"/>
                    <TextBlock Text="1" Visibility="Hidden" Grid.Row="5"/>
                    <TextBlock Text="1" Visibility="Hidden" Grid.Row="7"/>
                    <TextBlock Text="1" Visibility="Hidden" Grid.Row="9"/>
                    <TextBlock Text="1" Visibility="Hidden" Grid.Row="11"/>
                    <TextBlock Text="1" Visibility="Hidden" Grid.Row="13"/>
                    <Button VerticalAlignment="Top" Visibility="Hidden"  OverridesDefaultStyle="True" MinHeight="0" MinWidth="0" Margin="2"  Grid.Column="5" Focusable="False">
                        <Button.Content>
                            <Image Source="pack://application:,,,/Images/closex.png" Stretch="Uniform"/>
                        </Button.Content>
                    </Button>
                    
                    <vmcontrol:VMTextBlock_Price_GroupHeader_CanEdit TextPath="UIText_ProdutionCosts" Margin="2"  Grid.Column="0" Grid.Row="0"/>
                    <vmcontrol:VMTextBox_Number_ReadOnly Text="{Binding ProdutionCosts, Mode = OneWay}" Margin="2"  Grid.Column="4" Grid.Row="0"/>
                    
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_GeneralCostsForManagementAndAdministration" Margin="2"  Grid.Column="0" Grid.Row="2"/>
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_RatePercent" Margin="2"  Grid.Column="1"  Grid.Row="2" HorizontalAlignment="Right" />
                    <vmcontrol:VMTextBox_Number Text="{Binding General_RatePercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"  Grid.Column="2"  Grid.Row="2"/>
                    <vmcontrol:VMTextBox_Number_ReadOnly Text="{Binding GeneralCosts, Mode = OneWay}" Margin="2"  Grid.Column="4"  Grid.Row="2"/>

                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_ThirdpartyWorks" Margin="2"  Grid.Column="0" Grid.Row="4"/>
                    <vmcontrol:VMTextBox_Number Text="{Binding ThirdpartyWorks, UpdateSourceTrigger = PropertyChanged}" Margin="2"  Grid.Column="4" Grid.Row="4"/>

                    <vmcontrol:VMTextBlock_Price_GroupHeader_CanEdit TextPath="UIText_PrimeCosts" Margin="2"  Grid.Column="0" Grid.Row="6"/>
                    <vmcontrol:VMTextBox_Number_ReadOnly Text="{Binding PrimeCosts, Mode = OneWay}" Margin="2"  Grid.Column="4" Grid.Row="6"/>

                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_RiskAndProfit" Margin="2"  Grid.Column="0" Grid.Row="8"/>
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_RatePercent:" Margin="2"  Grid.Column="1"  Grid.Row="8" HorizontalAlignment="Right" />
                    <vmcontrol:VMTextBox_Number Text="{Binding RiskAndProfit_RatePercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"  Grid.Column="2"  Grid.Row="8"/>
                    <vmcontrol:VMTextBox_Number_ReadOnly Text="{Binding RiskAndProfitCosts, Mode = OneWay}" Margin="2"  Grid.Column="4"  Grid.Row="8"/>

                    <vmcontrol:VMTextBlock_Price_GroupHeader_CanEdit TextPath="UIText_CalculatedPrice" Margin="2"  Grid.Column="0" Grid.Row="10"/>
                    <vmcontrol:VMTextBox_Number_ReadOnly Text="{Binding CalculatedPrice, Mode = OneWay}" Margin="2"  Grid.Column="4" Grid.Row="10"/>
                    
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_ValueAddedTax" Margin="2"  Grid.Column="0" Grid.Row="12"/>
                    <vmcontrol:VMTextBlock_Price_1_CanEdit TextPath="UIText_RatePercent" Margin="2"  Grid.Column="1"  Grid.Row="12" HorizontalAlignment="Right" />
                    <vmcontrol:VMTextBox_Number Text="{Binding ValueAddedTax_RatePercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"  Grid.Column="2"  Grid.Row="12"/>
                    <vmcontrol:VMTextBox_Number_ReadOnly Text="{Binding ValueAddedTaxCosts, Mode = OneWay}" Margin="2"  Grid.Column="4"  Grid.Row="12"/>

                    <vmcontrol:VMTextBlock_Price_GroupHeader_CanEdit TextPath="UIText_SALSEPRICE" Margin="2"  Grid.Column="0" Grid.Row="14"/>
                    <vmcontrol:VMTextBox_Number_ReadOnly Text="{Binding SalesPrice, Mode = OneWay}" Margin="2"  Grid.Column="4" Grid.Row="14"/>

                </Grid> 
                <TextBlock Text="1" Visibility="Hidden"/>
            </StackPanel>

            
        </StackPanel>
    </ScrollViewer>
</UserControl>
